﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ExcelImport
{
    [AttributeUsage(AttributeTargets.Property)]
    public class DataLengthAttribute : Attribute
    {
        public int? MinLength;
        public int? MaxLength;
        public DataLengthAttribute(int minLength = -1, int maxLength = -1)
        {
            if (minLength > 0)
            {
                this.MinLength = minLength;
            }

            if (maxLength > 0 && maxLength >= minLength)
            {
                this.MaxLength = maxLength;
            }
        }
    }
}
